# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rlwrap
pkgver=0.43
pkgrel=1
pkgdesc="A readline wrapper"
url="https://github.com/hanslub42/rlwrap"
arch="all"
license="GPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev readline-dev ncurses-dev"
install=""
subpackages="$pkgname-doc"
source="https://github.com/hanslub42/rlwrap/releases/download/v$pkgver/rlwrap-$pkgver.tar.gz"
builddir="$srcdir/rlwrap-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="4a1440b2eef3a1664c6381eb09c19f4030de2c0ef4f1f3509f7d6e130d3c5e9c3ceb00fc6ea6052b22bbe1f6b162f72e0b47564df34ccecc5220f195c22e86a1  rlwrap-0.43.tar.gz"
